/*
  argv[1] is the file which needs to be compressed.
  argv[2] is the number of keys to generate.
*/

#include <stdlib.h>
#include <stdio.h>
#include <string.h>

void createFiles(char* fname, char* numOfKeys);


int main(int argc, char* argv[]){
  if(argc == 1){
    printf("Usage: %s [File name]\n", argv[0]);
    return 0;
  }
  createFiles(argv[1], argv[2]);
}

void createFiles(char* fname, char* numOfKeys){
  int fd, fdk;
  char* num =  (char*) malloc(20);
  char* box_name = (char*) malloc(20);
  strcpy(box_name,fname);

  char* key_name = (char*) malloc(20);
  strcpy(key_name,fname);


  char* ext = ".box";
  int NOKey = atoi(numOfKeys);
  printf("NOKey is %d", NOKey);
  strcat(box_name, ext);

  //Create vault file
  if(fd = creat(box_name, 0644) == -1){
    perror(box_name);
  }
}
